<%@ page import="activity.Serial" %>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="serial.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${serialInstance?.name}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'host', 'error')} required">
	<label for="host">
		<g:message code="serial.host.label" default="Host" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="host" required="" value="${serialInstance?.host}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'url', 'error')} ">
	<label for="url">
		<g:message code="serial.url.label" default="Url" />
		
	</label>
	<g:textField name="url" value="${serialInstance?.url}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'memo', 'error')} ">
	<label for="memo">
		<g:message code="serial.memo.label" default="Memo" />
	</label>
        <m:ckeditor name="memo" value="${serialInstance?.memo}" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'tel', 'error')} ">
	<label for="tel">
		<g:message code="serial.tel.label" default="Tel" />
		
	</label>
	<g:textField name="tel" value="${serialInstance?.tel}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'fax', 'error')} ">
	<label for="fax">
		<g:message code="serial.fax.label" default="Fax" />
		
	</label>
	<g:textField name="fax" value="${serialInstance?.fax}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'email', 'error')} ">
	<label for="email">
		<g:message code="serial.email.label" default="Email" />
		
	</label>
	<g:textField name="email" value="${serialInstance?.email}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'staff', 'error')} ">
	<label for="staff">
		<g:message code="serial.staff.label" default="Staff" />
		
	</label>
	<g:textField name="staff" value="${serialInstance?.staff}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'code', 'error')} ">
	<label for="code">
		<g:message code="serial.code.label" default="Code" />
		
	</label>
	<g:textField name="code" value="${serialInstance?.code}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'nameEng', 'error')} ">
	<label for="nameEng">
		<g:message code="serial.nameEng.label" default="Name Eng" />
		
	</label>
	<g:textField name="nameEng" value="${serialInstance?.nameEng}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: serialInstance, field: 'events', 'error')} ">
	<label for="events">
		<g:message code="serial.events.label" default="Events" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${serialInstance?.events?}" var="e">
    <li><g:link controller="event" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
</div>